<template>
  <div class="settingclosed">
    <div class="settingclosed-top">
      <i class="el-icon-warning" type="primary"/><br>
      <span>尚未启用云视频</span>
      <br>
      <el-button type="primary" size="medium" @click="createData()">立即启用</el-button>
    </div>
  </div>
</template>

<script>
  import {getTenantId} from '@/utils/auth';
  import {addData, getData} from '@/api/cloud/cloud_live_set';

  export default {
    data() {
      return {
        CloudLiveSet: {
          status: '0'
        }
      }
    },
    methods: {
      createData() {
        this.CloudLiveSet.tenantId = getTenantId();
        this.CloudLiveSet.status = '1';
        addData(this.CloudLiveSet).then(() => {
          this.$notify({
            title: '成功',
            message: '操作成功',
            type: 'success',
            duration: 2000
          });
        });
        this.$emit('open')
      },
    }
  }
</script>

<style lang="scss">
  .settingclosed {
    width: 900px;
    box-shadow: 0 0px 10px rgba(205, 225, 225, 1);
    margin-top: 30px;

    &-top {
      width: 100%;
      height: 207px;
      text-align: center;
      padding-top: 50px;

      .el-button {
        margin-top: 20px;
      }

      .el-icon-warning {
        font-size: 50px;
        margin-bottom: 10px;
        color: #409eff;
      }
    }

    &-main {
      width: 100%;

      p {
        margin: 0;
        line-height: 30px;
        font-size: 16px;
        text-align: center;
      }
    }
  }
</style>
